package Demo1;

import java.util.Arrays;
import java.util.Scanner;

public class Test {
    //要求输入时，分，秒的一个具体时间，打印输出它的下一秒
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String time=scanner.nextLine();
        String hour1=time.substring(0,2);
        String minute1=time.substring(3,5);
        String second1=time.substring(6,8);
        //System.out.println(hour1);
        int hour=Integer.parseInt(hour1);
        int minute=Integer.parseInt(minute1);
        int second=Integer.parseInt(second1);
        if(second==59&&minute==59&&hour==23){
            System.out.println("00:00:00");
        }else if(second==59&&minute==59&&hour!=23){
            System.out.println((hour+1)+"00:00");
        }else if(second==59&&minute!=59){
            System.out.println(hour+":"+(minute+1)+":00");
        }else{
            System.out.println(hour+":"+minute+":"+(second+1));
        }
    }


    //圆周率的值
    public static void main1(String[] args) {
        double PI=0;
        double s=4;
        double q=1;
        int count=0;
        while (true){
            count++;
            PI+=s/q;
            if(PI>=3.14159256&&PI<=3.1415927){
                break;
            }else{
                s=-s;
                q+=2;
            }
        }
        System.out.println("要经过"+count+"次计算");
    }
}
